package com.yangjiangtao.reflect.ioc;

public class Main {
    public static void main(String[] args) throws Exception {
        MyApplicationContext context = new MyApplicationContext("src/main/resources/application.xml");
        MoAttack moAttack = (MoAttack) context.getBean("moAttack");//获取moAttack bean
        moAttack.cityGateAsk();//调用cityGateAsk方法，输出：墨者革离
    }
}
//运行Main类时，MyApplicationContext会解析application.xml文件，创建MoAttack和LiuDeHua的实例，并完成依赖注入